<div>
	<form method="post" id="form_${action_id}" name="form_${action_id}" enctype="multipart/form-data" >
	<#if id!=''>
		<input type="hidden" name="entity.parent.id" id="entity.parent.id" value="${id?default('')}" />
	</#if>
    <table class="form-table" cellpadding=3>
    	<tr>
            <td>${action.getDatagridTitle('name')}:</td>
            <td><input id="entity.name" name="entity.name" type="text" style="width: 300px;"  class="easyui-validatebox" data-options="required:true,validType:'length[1,64]'"   /></td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('order')}:</td>
            <td><input id="entity.order" name="entity.order" type="text" style="width: 300px;"  class="easyui-numberspinner" data-options="editable:false,required:true,min:1,max:999"   /></td>
        </tr>
        <tr>
            <td>${action.getDatagridTitle('state')}:</td>
            <td>
            	<select class="easyui-combobox" name="entity.state" style="width:300px;" data-options="required:true">
            		<#list states as state>
            		<option value="${state.state}">${action.getDatagridTitle('state.'+state.name())}</option>
            		</#list>
            	</select>
            </td>
        </tr>
        <tr>
        	<td>${action.getDatagridTitle('type')}:</td>
            <td><select id="entity.type" name="entity.type.id" class="easyui-combobox" style="width:300px;">
            	<#list types as type>
            		<option value="${type.id}">${type.name}</option>
            	</#list>
            </td>
        </tr>
        <tr>	
			<td>${action.getDatagridTitle('icon')}：</td>
			<input type="file" id="entity_icon_${action_id}" name="entity.icon" onchange="$('#entity_icon_${action_id}_filename').empty();$('#entity_icon_${action_id}_filename').text(this.value);" style="display: none" />
			<td colspan="3">
				<a href="javascript:;;" onclick="$('#entity_icon_${action_id}').click();" class="easyui-linkbutton" data-options="iconCls:'icon-save'">选择文件</a>
				<span id="entity_icon_${action_id}_filename"></span>
			</td>
		</tr>
    </table>
	</form>
</div>
